package archer.application.core.entity.user;

import archer.application.core.constant.Constant;
import archer.application.core.entity.system.UserRoleRel;

import javax.persistence.*;
import java.util.List;

/**
 * @author christ
 * @date 2016/6/7
 */
@Entity
@Inheritance
@DiscriminatorValue(Constant.UserType.STAFF)
public class Staff extends User {

    public static final Find<Staff> find = new Find<Staff>(Staff.class);

    @Column(columnDefinition = "char(1)  default 'N' COMMENT '是否系统数据'")
    protected String sysData = Constant.EntityDefault.N;

    @OneToMany(mappedBy = "staff")
    private List<UserRoleRel> userRoleRels;

    public String getSysData() {
        return sysData;
    }

    public Staff setSysData(String sysData) {
        this.sysData = sysData;
        return this;
    }

    public List<UserRoleRel> getUserRoleRels() {
        return userRoleRels;
    }

    public Staff setUserRoleRels(List<UserRoleRel> userRoleRels) {
        this.userRoleRels = userRoleRels;
        return this;
    }

}
